<template>
	<view class="page">
		<!-- <pageHeader title="学习中心"> </pageHeader> -->
		<view class="between" v-show="cur<2">
			 <u-tabs :list="list1" :lineHeight="0" :activeStyle="{
        color: '#303133',
        fontWeight: 'bold',
		fontSize:'40rpx',
        transform: 'scale(1.05)'
    }" @click="changeTab($event)"></u-tabs>
			<uni-icons type="search" size="30" @click="last=cur;cur=2"></uni-icons>
		</view>
		<view  v-show="cur==0">
			<care v-if="care"></care>
			<nocare v-else></nocare>
		</view>
		
		<near v-show="cur==1"></near>
		<search  v-show="cur==2" @cancel="cur=last"></search>		
	</view>
</template>
<script>
	import near from './near/index.vue'
	import care from './care/index.vue'
	import nocare from './care/nocare.vue'
	import search from './search/index.vue'
	
	export default {
		components:{
		   near,care,search,nocare
		},
		props:{
			
		},
		data() {
					return {
						care:false,
						cur:0,
						last:0,
		                list1: [{
		                    name: '关注',
		                }, {
		                    name: '附近'
		                }]
					}
				},
				methods: {
		            changeTab(item) {
		                console.log('item', item);
						this.cur = item.index
		            }
				}
	}
</script>
<style lang="scss" scoped>
	.page{
		padding: 20rpx;
		height: calc(100vh - 50px);
		overflow: hidden;
	}
</style>